package com.xxwy.array.practice;

import com.xxwy.array.Array;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xxwy
 */
public class Main {

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        Array<Integer> array = new Array<>();
        for (int i = 0; i < 100; i++) {
            array.addFirst(i);
        }
        System.out.println(System.currentTimeMillis()-start);
        System.out.println(array.toString());
        System.out.println("=============");
        long start2 = System.currentTimeMillis();
        List<Integer> arrayJava = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            arrayJava.add(0,i);
        }
        System.out.println(System.currentTimeMillis()-start2);
        System.out.println(arrayJava.toString());

    }

}
